The method Overlap Derivative and Add Sin wave (ODAS) is a method I have developed for time stretching. It's designed to be used in real time, It can be used whenever you play a wave track. It is used for digital stored audio files. The file has to be stored using Pulse Code Modulation (PCM) format. The sample levels for each value must be linear; that is, the steps between the values must be same for small and large values. The method recalculate frames of the digital information. Every frame is played twice. To be able to do this we get a major problem: The frames first and last sample doesn't have the same value, there's one chance on 65565 that they are the same. This will result in a strong click at the position where the first frames last vale and second frames first value are. To remove this problem we simply raise the second played frames first value to the value of the first played frames last value. The rest of the values in the last frame are then moved in a sine wave form. So the last value of the last played frames sample is the same. Therefor the last played frames sample and next frames first value is as in the original digital information. The frequency of the added sine wave must be less than the lowest frequency in frequency range of the digital audio file. Since most speakers don't go lower that 40 Hz the frequency can be set at 40 Hz as in Rosoft CD Extractor. To make the method complete we check where the derivative is as smallest and where the value is as close as possible to the first samples value. The derivative at the found position must match the derivative at the first position in the original frame. If the derivative at the first position in the original frame is negative and the found derivative is positive it will result in a peak. From that frames position we add a sine wave not necessarily 40 Hz (a little bit more than 40 Hz) so the new stretched frame will be first frame size times two minus the maximum overlap size. This will also result in a time stretch that is close to and not exact half the speed of the original digital audio signal. I have decided not to release the code for this. It is not a hard method to implement. Just simple high school mathematics. It is easy to find the derivative of a sine wave. Just check the differences between signal S(n) and signal S(n+1). The difference is the derivative. If S(n) > S(n+1) then the derivative is negative else it is positive.
[HOME]